<template>

    <div class="mui-numbox" data-numbox-min="1" :data-numbox-max="max" style="height:25px;width:110px;">
      <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
      <input id="test" class="mui-input-numbox" type="number" value="1"  @change="countChange()"/>
      <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
    </div>

</template>
<script>
import mui from "../../lib/mui/js/mui.js";
export default {
  mounted() {
    //手动初始化mui中number box组件
    mui(".mui-numbox").numbox();
  },
  methods:{
    countChange(){
     //数量改变了
    }
  },
  //将父组件传递过来的数据现在props中定义一下，这样才能使用这个数据
  props:['max']

};
</script>
<style lang="scss" scoped>
 .mui-numbox{
   margin:0 5px;
 }
</style>
